notebook: Set tabs child visible before allocating a size
authorTimm Bäder <mail@baedert.org>
Sat, 22 Jul 2017 12:13:03 +0000 (14:13 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 22 Jul 2017 17:36:05 +0000 (19:36 +0200)
Otherwise we might skip them here, then set child-visible to TRUE and
then later snapshot them even though they have no valid size.

gtk/gtknotebook.c

index bef55bd5a367de2a3b397c6775197759516f072b..ce55bc5b9e01a021c6233d57abcfe7acd238233c 100644 (file)
@@ -5094,6 +5094,10 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook          *notebook,
           break;
         }
 
+      /* set child visible */
+      if (page->tab_label)
+        gtk_widget_set_child_visible (page->tab_widget, TRUE);
+
       if (page == priv->cur_page && priv->operation == DRAG_OPERATION_REORDER)
         {
           GtkAllocation fixed_allocation = { priv->drag_window_x, priv->drag_window_y,
@@ -5160,10 +5164,6 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook          *notebook,
 
           break;
         }
-
-      /* set child visible */
-      if (page->tab_label)
-        gtk_widget_set_child_visible (page->tab_widget, TRUE);
     }
 
   /* Don't move the current tab past the last position during tabs reordering */